package com.bml.architect.framework.protocol.http;

import com.bml.architect.framework.Address;
import com.bml.architect.framework.Invocation;
import com.bml.architect.framework.protocol.Protocol;

public class HttpProtocol implements Protocol {
    @Override
    public  void start(Address address) {
        HttpServer server = new HttpServer();
        server.start(address);
    }

    @Override
    public String send(Address address, Invocation invocation) {
        HttpClient client = new HttpClient();
        return client.send(address.getHostname(),address.getPort(),invocation);
    }
}
